//
//  NextViewController.m
//  clickBtn
//
//  Created by chenleping on 2018/9/4.
//  Copyright © 2018年 DSY. All rights reserved.
//

#import "NextViewController.h"

@interface NextViewController ()

@end

@implementation NextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor greenColor];
    UIButton * redBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:redBtn];
    redBtn.backgroundColor = [UIColor redColor];
    redBtn.frame = CGRectMake(100, 100, 100, 100);
    [redBtn addTarget:self action:@selector(clickBtn) forControlEvents:UIControlEventTouchUpInside];
    
}


- (void)clickBtn{
    NSLog(@"有网络。。。");
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
